<?php
/* @var $this AssetController */
/* @var $model Asset */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'asset-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	
	<div class="row">
		<?php echo $form->labelEx($model,'unit_id'); ?>
		<?php echo $form->dropDownList($model,'unit_id', CHtml::listData(
		Unit::model()->findAll(), 'id', 'unit_no'), array('prompt' => 'Select Unit')); ?>
		<?php echo $form->error($model,'unit_id'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'asset_description'); ?>
		<?php echo $form->textField($model,'asset_description',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'asset_description'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'asset_type'); ?>
		<?php echo $form->textField($model,'asset_type',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'asset_type'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'asset_quantity'); ?>
		<?php echo $form->textField($model,'asset_quantity'); ?>
		<?php echo $form->error($model,'asset_quantity'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->